#!/bin/bash

#Dialup panel for BigLinux
#
#Authors:
#  Bruno Goncalves Araujo <www.biglinux.com.br>
#
#License: GPLv2 or later
#################################################

echo 'mkdir /root 2> /dev/null
mkdir /root/.kde 2> /dev/null
mkdir /root/.kde/share 2> /dev/null
mkdir /root/.kde/share/config 2> /dev/null
cp -f /usr/share/bigdialer/kppprc /root/.kde/share/config/kppprc' > /tmp/bigdialroot$$

echo "sed -i \"s/BigConexao/$p_provider - $p_city\/$p_state/g;s/99999999/$p_phone/g;s/biglogin/$p_provider/g;s/bigsenha/$p_provider/g\" /root/.kde/share/config/kppprc" >> /tmp/bigdialroot$$

echo 'mkdir /root/.kppp 2> /dev/null
cd /root/.kppp
nohup kppp 2> /dev/null > /dev/null &' >> /tmp/bigdialroot$$

chmod +x /tmp/bigdialroot$$
bigsudo /tmp/bigdialroot$$
rm -f /tmp/bigdialroot$$

echo "<body onload= parent.location='/usr/share/bigbashview/exemplo2.sh?close=True'>"